package com.as.server.mapper;

import com.as.server.entity.Follow;
import com.github.pagehelper.Page;
import org.apache.ibatis.annotations.Mapper;


/**
* @author wuying
* @description 针对表【follow】的数据库操作Mapper
* @createDate 2022-12-04 16:46:12
* @Entity com.as.server.entity.Follow
*/
@Mapper
public interface FollowMapper {

    int deleteByPrimaryKey(Long id);

    int insert(Follow record);

    int insertSelective(Follow record);

    Follow selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Follow record);

    int updateByPrimaryKey(Follow record);

    /**
     * 关注人数
     * @param uidTo
     * @return
     */
    Page<Follow> selectAllByUidtoPage(Long uidTo);

    /**
     * 粉丝人数
     * @param uidFollow
     * @return
     */
    Page<Follow> selectAllByUidFollowPage(Long uidFollow);

    /**
     * 关注人数
     * @param uidTo
     * @return
     */
    int selectByConcernNumber(Long uidTo);

    /**
     * 粉丝人数
     * @param uidFollow
     * @return
     */
    int selectByFanNumber(Long uidFollow);

}
